{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "6fbe566f",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a0d6b1f1",
   "metadata": {},
   "source": [
    "### Matrix Multiplication"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "77a499e1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "First matrix:\n",
      " [[4 3 3]\n",
      " [2 4 2]\n",
      " [0 1 4]]\n",
      "\n",
      "Second matrix:\n",
      " [[4 8 1]\n",
      " [0 2 3]\n",
      " [6 6 2]]\n",
      "\n",
      "Product of the two matrix\n",
      "[[34 56 19]\n",
      " [20 36 18]\n",
      " [24 26 11]]\n"
     ]
    }
   ],
   "source": [
    "def matgen3d():\n",
    "    \"\"\"\n",
    "    Function to generate a random integer 3x3 matrix\n",
    "    Min value: 1, Max value: 9\n",
    "    \"\"\"\n",
    "    return np.random.randint(low=0, high=10, size=(3,3))\n",
    "\n",
    "mat1 = matgen3d()\n",
    "mat2 = matgen3d()\n",
    "\n",
    "print(\"First matrix:\\n\", mat1)\n",
    "print()\n",
    "print(\"Second matrix:\\n\", mat2)\n",
    "print()\n",
    "print(\"Product of the two matrix\")\n",
    "print(np.matmul(mat1, mat2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2b277c10",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
